package com.anyou.mall.goo.service.impl;

import java.util.List;
import com.anyou.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.anyou.mall.goo.mapper.GooGoodsSuitPlanMapper;
import com.anyou.mall.goo.domain.GooGoodsSuitPlan;
import com.anyou.mall.goo.service.IGooGoodsSuitPlanService;

/**
 * 商品套餐帮助表Service业务层处理
 * 
 * @author xq
 * @date 2022-04-08
 */
@Service
public class GooGoodsSuitPlanServiceImpl implements IGooGoodsSuitPlanService 
{
    @Autowired
    private GooGoodsSuitPlanMapper gooGoodsSuitPlanMapper;

    /**
     * 查询商品套餐帮助表
     * 
     * @param goodsSuitPlanId 商品套餐帮助表主键
     * @return 商品套餐帮助表
     */
    @Override
    public GooGoodsSuitPlan selectGooGoodsSuitPlanByGoodsSuitPlanId(Long goodsSuitPlanId)
    {
        return gooGoodsSuitPlanMapper.selectGooGoodsSuitPlanByGoodsSuitPlanId(goodsSuitPlanId);
    }

    /**
     * 查询商品套餐帮助表列表
     * 
     * @param gooGoodsSuitPlan 商品套餐帮助表
     * @return 商品套餐帮助表
     */
    @Override
    public List<GooGoodsSuitPlan> selectGooGoodsSuitPlanList(GooGoodsSuitPlan gooGoodsSuitPlan)
    {
        return gooGoodsSuitPlanMapper.selectGooGoodsSuitPlanList(gooGoodsSuitPlan);
    }

    /**
     * 新增商品套餐帮助表
     * 
     * @param gooGoodsSuitPlan 商品套餐帮助表
     * @return 结果
     */
    @Override
    public int insertGooGoodsSuitPlan(GooGoodsSuitPlan gooGoodsSuitPlan)
    {
        gooGoodsSuitPlan.setCreateTime(DateUtils.getNowDate());
        return gooGoodsSuitPlanMapper.insertGooGoodsSuitPlan(gooGoodsSuitPlan);
    }

    /**
     * 修改商品套餐帮助表
     * 
     * @param gooGoodsSuitPlan 商品套餐帮助表
     * @return 结果
     */
    @Override
    public int updateGooGoodsSuitPlan(GooGoodsSuitPlan gooGoodsSuitPlan)
    {
        return gooGoodsSuitPlanMapper.updateGooGoodsSuitPlan(gooGoodsSuitPlan);
    }

    /**
     * 批量删除商品套餐帮助表
     * 
     * @param goodsSuitPlanIds 需要删除的商品套餐帮助表主键
     * @return 结果
     */
    @Override
    public int deleteGooGoodsSuitPlanByGoodsSuitPlanIds(Long[] goodsSuitPlanIds)
    {
        return gooGoodsSuitPlanMapper.deleteGooGoodsSuitPlanByGoodsSuitPlanIds(goodsSuitPlanIds);
    }

    /**
     * 删除商品套餐帮助表信息
     * 
     * @param goodsSuitPlanId 商品套餐帮助表主键
     * @return 结果
     */
    @Override
    public int deleteGooGoodsSuitPlanByGoodsSuitPlanId(Long goodsSuitPlanId)
    {
        return gooGoodsSuitPlanMapper.deleteGooGoodsSuitPlanByGoodsSuitPlanId(goodsSuitPlanId);
    }
}
